home *** CD-ROM | disk | FTP | other *** search
/ Hacker's Arsenal - The Cutting Edge of Hacking / Hacker's Arsenal - The Cutting Edge of Hacking.iso / texts / misc / ifws.txt < prev    next >
Encoding:
Text File  |  2001-07-11  |  22.1 KB  |  558 lines

  1. Internet Firewalls Frequently Asked Questions
  2. =============================================
  3.  
  4. About the FAQ
  5. =============
  6. This FAQ is not an advertisement or endorsement for any
  7. product, company, or consultant. The maintainer welcomes input
  8. and comments on the contents of this FAQ. Comments related
  9. to the FAQ should be addressed to Fwalls-FAQ@tis.com. The
  10. FAQ is also available via WWW from http://www.tis.com
  11.  
  12.  
  13. Contents:
  14. =========
  15. 1: What is a network firewall?
  16. 2: Why would I want a firewall?
  17. 3: What can a firewall protect against?
  18. 4: What can't a firewall protect against?
  19. 5: What are good sources of print information on firewalls?
  20. 6: Where can I get more information on firewalls on the  network?
  21. 7: What are some commercial products or consultants who sell/service firewalls?
  22. 8: What are some of the basic design decisions in a firewall?
  23. 9: What are proxy servers and how do they work?
  24. 10: What are some cheap packet screening tools?
  25. 11: What are some reasonable filtering rules for my Cisco?
  26. 12: How do I make DNS work with a firewall?
  27. 13: How do I make FTP work through my firewall?
  28. 14: How do I make Telnet work through my firewall?
  29. 15: How do I make Finger and whois work through my firewall?
  30. 16: How do I make gopher, archie, and other services work through my firewall?
  31. 17: What are the issues about X-Window through a firewall?
  32. 18: What is source routed traffic and why is it a threat?
  33. 19: What are ICMP redirects and redirect bombs?
  34. 20: Glossary of firewall related terms
  35.  
  36. ------------------------------
  37.  
  38. Date: Mon Jun 27 15:50:11 1994
  39. From: Fwalls-FAQ@tis.com
  40. Subject: 1: What is a network firewall?
  41.  
  42. A firewall is any one of several ways of protecting one
  43. network from another untrusted network. The actual mechanism
  44. whereby this is accomplished varies widely, but in
  45. principle, the firewall can be thought of as a pair of
  46. mechanisms: one which exists to block traffic, and the other
  47. which exists to permit traffic. Some firewalls place a
  48. greater emphasis on blocking traffic, while others emphasize
  49. permitting traffic.
  50.  
  51. ------------------------------
  52.  
  53. Date: Mon Jun 27 15:50:28 1994
  54. From: Fwalls-FAQ@tis.com
  55. Subject: 2: Why would I want a firewall?
  56.  
  57. The Internet, like any other society, is plagued with the
  58. kind of jerks who enjoy the electronic equivalent of writing
  59. on other people's walls with spraypaint, tearing their
  60. mailboxes off, or just sitting in the street blowing their
  61. car horns. Some people try to get real work done over the
  62. Internet, and others have sensitive or proprietary data they
  63. must protect. A firewall's purpose is to keep the jerks out
  64. of your network while still letting you get your job done.
  65.  
  66. Many traditional-style corporations and data centers have
  67. computing security policies and practices that must be
  68. adhered to. In a case where a company's policies dictate how
  69. data must be protected, a firewall is very important, since
  70. it is the embodiment of the corporate policy. Frequently,
  71. the hardest part of hooking to the Internet, if you're a
  72. large company, is not justifying the expense or effort, but
  73. convincing management that it's safe to do so. A firewall
  74. provides not only real security - it often plays an
  75. important role as a security blanket for management.
  76.  
  77. Lastly, a firewall can act as your corporate "ambassador" to
  78. the Internet. Many corporations use their firewall systems
  79. as a place to store public information about corporate
  80. products and services, files to download, bug-fixes, and so
  81. forth. Several of these systems have become important parts
  82. of the Internet service structure (e.g.: UUnet.uu.net,
  83. gatekeeper.dec.com) and have reflected well on their
  84. corporate sponsors.
  85.  
  86. ------------------------------
  87.  
  88. Date: Mon Jun 27 15:50:35 1994
  89. From: Fwalls-FAQ@tis.com
  90. Subject: 3: What can a firewall protect against?
  91.  
  92. Some firewalls permit only Email traffic through them,
  93. thereby protecting the network against any attacks other
  94. than attacks against the Email service. Other firewalls
  95. provide less strict protections, and block services that are
  96. known to be problems.
  97.  
  98. Generally, firewalls are configured to protect against
  99. unauthenticated interactive logins from the "outside" world.
  100. This, more than anything, helps prevent vandals from logging
  101. into machines on your network. More elaborate firewalls
  102. block traffic from the outside to the inside, but permit
  103. users on the inside to communicate freely with the outside.
  104. The firewall can protect you against any type of network
  105. borne attack if you unplug it.
  106.  
  107. Firewalls are also important since they can provide a single
  108. "choke point" where security and audit can be imposed.
  109. Unlike in a situation where a computer system is being attacked
  110. by someone dialing in with a modem, the firewall can act as
  111. an effective "phone tap" and tracing tool.
  112.  
  113. ------------------------------
  114.  
  115. Date: Mon Jun 27 15:50:48 1994
  116. From: Fwalls-FAQ@tis.com
  117. Subject: 4: What can't a firewall protect against?
  118.  
  119. Firewalls can't protect against attacks that don't
  120. go through the firewall. Many corporations that connect to
  121. the Internet are very concerned about proprietary data
  122. leaking out of the company through that route. Unfortunately
  123. for those concerned, a magnetic tape can just as effectively
  124. be used to export data. Firewall policies must be realistic,
  125. and reflect the level of security in the entire network. For
  126. example, a site with top secret or classified data doesn't
  127. need a firewall at all: they shouldn't be hooking up to the
  128. internet in the first place, or the systems with the really
  129. secret data should be isolated from the rest of the
  130. corporate network.
  131.  
  132. Firewalls can't protect very well against things
  133. like viruses. There are too many ways of encoding binary
  134. files for transfer over networks, and too many different
  135. architectures and viruses to try to search for them all.
  136. In other words, a firewall cannot replace security-
  137. consciousness on the part of your users. In general, a firewall
  138. cannot protect against a data-driven attack -- attacks in which
  139. something is mailed or copied to an internal host where it is
  140. then executed. This form of attack has occurred in the past
  141. against various versions of Sendmail.
  142.  
  143. ------------------------------
  144.  
  145. Date: Wed Jul 6 14:45:13 1994
  146. From: Fwalls-FAQ@tis.com
  147. Subject: 5: What are good sources of print information on firewalls?
  148.  
  149. There are several books that touch on firewalls. The best
  150. known are:
  151.  
  152. Title: Firewalls and Internet Security: Repelling the Wily Hacker
  153. Authors: Bill Cheswick and Steve Bellovin
  154. Publisher: Addison Wesley
  155. Edition: 1994
  156. ISBN: 0-201-63357-4
  157.  
  158. Title: Practical Unix Security
  159. Authors: Simson Garfinkel and Gene Spafford
  160. Publisher: O'Reilly
  161. Edition: 1991
  162. ISBN: 0-937175-72-2
  163. (discusses primarily host security)
  164.  
  165. Related references are:
  166.  
  167. Titles: Internetworking with TCP/IP  Vols I, II and III
  168. Authors: Douglas Comer and David Stevens
  169. Publisher: Prentice-Hall
  170. Edition: 1991
  171. ISBN: 0-13-468505-9 (I), 0-13-472242-6 (II), 0-13-474222-2 (III)
  172. Comment: A detailed discussion on the architecture and implementation of
  173. the Internet and its protocols.
  174. Vol I (on principles, protocols and architecture) is readable by
  175. everyone, Vol 2 (on design, implementation and internals) is
  176. more technical, and Vol 3 (on client-server computing) is
  177. recently out.
  178.  
  179. Title: Unix System Security - A Guide for Users and System Administrators
  180. Author: David Curry
  181. Publisher: Addision Wesley
  182. Edition: 1992
  183. ISBN: 0-201-56327-4
  184.  
  185. ------------------------------
  186.  
  187. Date: Mon Jun 27 15:54:03 1994
  188. From: Fwalls-FAQ@tis.com
  189. Subject: 6: Where can I get more information on firewalls on the network?
  190.  
  191. Ftp.greatcircle.com - Firewalls mailing list archives.
  192.                 Directory: pub/firewalls
  193.  
  194. Ftp.tis.com - Internet firewall toolkit and papers.
  195.                 Directory: pub/firewalls
  196.  
  197. Research.att.com - Papers on firewalls and breakins.
  198.                 Directory: dist/internet_security
  199.  
  200. Net.Tamu.edu - Texas AMU security tools.
  201.                 Directory: pub/security/TAMU
  202.  
  203. The internet firewalls mailing list is a forum for firewall
  204. administrators and implementors. To subscribe to Firewalls, send
  205. "subscribe firewalls"
  206. in the body of a message (not on the "Subject:" line) to
  207. "Majordomo@GreatCircle.COM". Archives of past Firewalls postings are
  208. available for anonymous FTP from ftp.greatcircle.com in pub/firewalls/archive
  209.  
  210. ------------------------------
  211.  
  212. Date: Fri May 5 09:34:43 1995
  213. From: Fwalls-FAQ@tis.com
  214. Subject: 7: What are some commercial products or consultants who sell/service firewalls?
  215.  
  216. We feel this topic is too sensitive to address in a FAQ, however,
  217. an independantly maintained list (no warrantee or recommendations
  218. are implied) can be found at URL:
  219. http://www.access.digex.net/~bdboyle/firewall.vendor.html
  220.  
  221. ------------------------------
  222.  
  223. Date: Mon Jun 27 15:54:23 1994
  224. From: Fwalls-FAQ@tis.com
  225. Subject: 8: What are some of the basic design decisions in a firewall?
  226.  
  227. There are a number of basic design issues that should be
  228. addressed by the lucky person who has been tasked with the
  229. responsibility of designing, specifying, and implementing or
  230. overseeing the installation of a firewall.
  231.  
  232. The first and most important is reflects the policy of how
  233. your company or organization wants to operate the system: is
  234. the firewall in place to explicitly deny all services except
  235. those critical to the mission of connecting to the net, or
  236. is the firewall in place to provide a metered and audited
  237. method of "queuing" access in a non-threatening manner.
  238. There are degrees of paranoia between these positions; the
  239. final stance of your firewall may be more the result of a
  240. political than an engineering decision.
  241.  
  242. The second is: what level of monitoring, redundancy, and
  243. control do you want? Having established the acceptable risk
  244. level (e.g.: how paranoid you are) by resolving the first
  245. issue, you can form a checklist of what should be monitored,
  246. permitted, and denied. In other words, you start by figuring
  247. out your overall objectives, and then combine a needs
  248. analysis with a risk assessment, and sort the almost always
  249. conflicting requirements out into a laundry list that
  250. specifies what you plan to implement.
  251.  
  252. The third issue is financial. We can't address this one here
  253. in anything but vague terms, but it's important to try to
  254. quantify any proposed solutions in terms of how much it will
  255. cost either to buy or to implement. For example, a complete
  256. firewall product may cost between $100,000 at the high end,
  257. and free at the low end. The free option, of doing some
  258. fancy configuring on a Cisco or similar router will cost
  259. nothing but staff time and cups of coffee. Implementing a
  260. high end firewall from scratch might cost several man-
  261. months, which may equate to $30,000 worth of staff salary
  262. and benefits. The systems management overhead is also a
  263. consideration. Building a home-brew is fine, but it's
  264. important to build it so that it doesn't require constant
  265. and expensive fiddling-with. It's important, in other words,
  266. to evaluate firewalls not only in terms of what they cost
  267. now, but continuing costs such as support.
  268.  
  269. On the technical side, there are a couple of decisions to
  270. make, based on the fact that for all practical purposes what
  271. we are talking about is a static traffic routing service
  272. placed between the network service provider's router and
  273. your internal network. The traffic routing service may be
  274. implemented at an IP level via something like screening
  275. rules in a router, or at an application level via proxy
  276. gateways and services.
  277.  
  278. The decision to make here is whether to place an exposed
  279. stripped-down machine on the outside network to run proxy
  280. services for telnet, ftp, news, etc., or whether to set up a
  281. screening router as a filter, permitting communication with
  282. one or more internal machines. There are plusses and minuses
  283. to both approaches, with the proxy machine providing a
  284. greater level of audit and potentially security in return
  285. for increased cost in configuration and a decrease in the
  286. level of service that may be provided (since a proxy needs
  287. to be developed for each desired service). The old trade-off
  288. between ease-of-use and security comes back to haunt us with
  289. a vengeance.
  290.  
  291. ------------------------------
  292.  
  293. Date: Mon Jun 27 15:54:30 1994
  294. From: Fwalls-FAQ@tis.com
  295. Subject: 9: What are proxy servers and how do they work?
  296.  
  297. A proxy server (sometimes referred to as an application
  298. gateway or forwarder) is an application that mediates
  299. traffic between a protected network and the Internet.
  300. Proxies are often used instead of router-based traffic
  301. controls, to prevent traffic from passing directly between
  302. networks. Many proxies contain extra logging or support for
  303. user authentication. Since proxies must "understand" the
  304. application protocol being used, they can also implement
  305. protocol specific security (e.g., an FTP proxy might be
  306. configurable to permit incoming FTP and block outgoing
  307. FTP).
  308.  
  309. Proxy servers are application specific. In order to support
  310. a new protocol via a proxy, a proxy must be developed for
  311. it. SOCKS is a generic proxy system that can be compiled
  312. into a client-side application to make it work through a
  313. firewall. Its advantage is that it's easy to use, but it
  314. doesn't support the addition of authentication hooks or
  315. protocol specific logging. For more information on SOCKS,
  316. see ftp.nec.com: /pub/security/socks.cstc   Users are
  317. encouraged to check the file "FILES" for a description
  318. of the directory's contents.
  319.  
  320. ------------------------------
  321.  
  322. Date: Mon Mar 13 10:21:02 1995
  323. From: Fwalls-FAQ@tis.com
  324. Subject: 10: What are some cheap packet screening tools?
  325.  
  326. The Texas AMU security tools include software for
  327. implementing screening routers (FTP net.tamu.edu,
  328. pub/security/TAMU).  Karlbridge is a PC-based screening
  329. router kit (
  330. ftp://ftp.net.ohio-state.edu/pub/kbridge    [US]
  331. ftp://ftp.gbnet.net/pub/kbridge             [UK/Europe]
  332. http://www.gbnet.net/kbridge/
  333. gopher://gopher.gbnet.net/
  334. ). A
  335. version of the Digital Equipment Corporation "screend"
  336. kernel screening software is available for BSD/386,
  337. NetBSD, and BSDI. Many commercial routers support screening
  338. of various forms.
  339.  
  340. ------------------------------
  341.  
  342. Date: Fri May 5 11:16:26 1995
  343. From: Fwalls-FAQ@tis.com
  344. Subject: 11: What are some reasonable filtering rules for my Cisco?
  345.  
  346. The following example shows one possible configuration for
  347. using the Cisco as a filtering router.  It is a sample that
  348. shows the implementation of a specific policy. Your policy
  349. will undoubtedly vary.
  350.  
  351. In this example, a company has Class B network address of 128.88.0.0
  352. and is using 8 bits for subnets.   The Internet connection is on the
  353. "red" subnet 128.88.254.0.  All other subnets are considered trusted
  354. or "blue" subnets.
  355.  
  356.      +---------------+ +---------------+    
  357.      | IP provider   | |   Gateway     |
  358.      | 128.88.254.1  | | 128.88.254.2  |  
  359.      +------+--------+ +------+--------+ 
  360.             |                            "Red" net
  361.   ----------+-----------------+----------------------------------
  362.                               |
  363.                        +------+--------+    
  364.                        |   Cisco       | 
  365.                        | 128.88.254.3  |
  366.                        |...............|
  367.                        | 128.88.1.1    |  
  368.                        +---------------+    
  369.                               |   
  370.   ----------------------------+----------------------------------
  371.             |                            "Blue" net
  372.      +------+--------+    
  373.      | mail router   |
  374.      | 128.88.1.2    |
  375.      +---------------+    
  376.  
  377. Keeping the following points in mind will help in understanding the
  378. configuration fragments:
  379.  
  380.  1. In these rules the Ciscos are applying filtering to output packets only.
  381.  2. Rules are tested in order and stop when the first match is found.
  382.  3. There is an implicit deny rule at the end of an access list that
  383.      denies everything.
  384.  
  385. The example below concentrates on the filtering parts of a configuration.
  386. Line numbers and formatting have been added for readability.
  387.  
  388. The policy to be implemented is:
  389.      Anything not explicitly allowed is denied
  390.      Traffic between the external gateway machine and
  391.        blue net hosts is allowed.  
  392.      Permit services orginating from the blue net
  393.      Allow a range of ports for FTP data connections back to the
  394.        blue net.  
  395.  
  396.      1  no ip source-route
  397.      2  !
  398.      3  interface Ethernet 0
  399.      4  ip address 128.88.1.1 255.255.255.0
  400.      5  ip access-group 10
  401.      6  !
  402.      7  interface Ethernet 1
  403.      8  ip address 128.88.254.3 255.255.255.0
  404.      9  ip access-group 11
  405.     10  !
  406.     11  access-list 10 permit ip 128.88.254.2 0.0.0.0
  407.          128.88.0.0 0.0.255.255
  408.     12  access-list 10 deny   tcp 0.0.0.0 255.255.255.255
  409.          128.88.0.0 0.0.255.255 lt 1025
  410.     13  access-list 10 deny   tcp 0.0.0.0 255.255.255.255
  411.          128.88.0.0 0.0.255.255 gt 4999
  412.     14  access-list 10 permit tcp 0.0.0.0 255.255.255.255
  413.          128.88.0.0 0.0.255.255
  414.     15  !
  415.     16  access-list 11 permit ip 128.88.0.0 0.0.255.255
  416.          128.88.254.2 0.0.0.0
  417.     17  access-list 11 deny   tcp 128.88.0.0 0.0.255.255
  418.          0.0.0.0 255.255.255.255 eq 25
  419.     18  access-list 11 permit tcp 128.88.0.0 0.0.255.255
  420.          0.0.0.0 255.255.255.255
  421.  
  422.  
  423. Lines   Explanation
  424.     1   Although this is not a filtering rule, it is good to include here.
  425.  
  426.     5   Ethernet 0 is on the red net.  Extended access list 10 will
  427.         be applied to output on this interface.  You can also
  428.         think of output from the red net as input on the blue net.
  429.  
  430.     9   Ethernet 1 is on the blue net.  Extended access list 11 will
  431.         be applied to output on this interface.
  432.  
  433.    11   Allow all traffic from the gateway machine to the blue net.
  434.  
  435. 12-14   Allow connections originating from the red net that come in
  436.         between ports 1024 and 5000.  This is to allow ftp data
  437.         connections back into the blue net.  5000 was chosen as the
  438.         upper limit as it is where OpenView starts.
  439.  
  440.         Note: again, we are assuming this is acceptable for the given policy.
  441.               There is no way to tell a Cisco to filter on source port.
  442.               Newer versions of the Cisco firmware will apparently support
  443.               source port filtering.
  444.  
  445.         Since the rules are tested until the first match we must use this
  446.         rather obtuse syntax.
  447.  
  448.    16   Allow all blue net packets to the gateway machine.
  449.  
  450.    17   Deny SMTP (tcp port 25) mail to the red net.
  451.  
  452.    18   Allow all other TCP traffic to the red net.
  453.  
  454. Cisco.Com has an archive of examples for building firewalls
  455. using Cisco routers, available for FTP from: ftp.cisco.com
  456. in  /pub/acl-examples.tar.Z
  457.  
  458. Newer revisions of the Cisco firmware (starting at 9.21) allow the
  459. administrator to specify packet filtering on inbound or outbound
  460. packets.
  461.  
  462. ------------------------------
  463.  
  464. Date: Mon Jun 27 16:00:08 1994
  465. From: Fwalls-FAQ@tis.com
  466. Subject: 12: How do I make DNS work with a firewall?
  467.  
  468. Some organizations want to hide DNS names from the outside.
  469. Many experts disagree as to whether or not hiding DNS names
  470. is worthwhile, but if site/corporate policy mandates hiding
  471. domain names, this is one approach that is known to work.
  472.  
  473. This approach is one of many, and is useful for
  474. organizations that wish to hide their host names from the
  475. Internet. The success of this approach lies on the fact that
  476. DNS clients on a machine don't have to talk to a DNS server
  477. on that same machine.  In other words, just because there's
  478. a DNS server on a machine, there's nothing wrong with (and
  479. there are often advantages to) redirecting that machine's
  480. DNS client activity to a DNS server on another machine.
  481.  
  482. First, you set up a DNS server on the bastion host that the
  483. outside world can talk to. You set this server up so that it
  484. claims to be authoritative for your domains.  In fact, all
  485. this server knows is what you want the outside world to
  486. know; the names and addresses of your gateways, your
  487. wildcard MX records, and so forth.  This is the "public"
  488. server.
  489.  
  490. Then, you set up a DNS server on an internal machine.  This
  491. server also claims to be authoritiative for your domains;
  492. unlike the public server, this one is telling the truth.
  493. This is your "normal" nameserver, into which you put all
  494. your "normal" DNS stuff.  You also set this server up to
  495. forward queries that it can't resolve to the public server
  496. (using a "forwarders" line in /etc/named.boot on a UNIX
  497. machine, for example).
  498.  
  499. Finally, you set up all your DNS clients (the
  500. /etc/resolv.conf file on a UNIX box, for instance),
  501. including the ones on the machine with the public server, to
  502. use the internal server.  This is the key.
  503.  
  504. An internal client asking about an internal host asks the
  505. internal server, and gets an answer; an internal client
  506. asking about an external host asks the internal server,
  507. which asks the public server, which asks the Internet, and
  508. the answer is relayed back.  A client on the public server
  509. works just the same way.  An external client, however,
  510. asking about an internal host gets back the "restricted"
  511. answer from the public server.
  512.  
  513. This approach assumes that there's a packet filtering
  514. firewall between these two servers that will allow them to
  515. talk DNS to each other, but otherwise restricts DNS between
  516. other hosts.
  517.  
  518. Another trick that's useful in this scheme is to employ
  519. wildcard PTR records in your IN-ADDR.ARPA domains. These
  520. cause an an address-to-name lookup for any of your non-
  521. public hosts to return something like "unknown.YOUR.DOMAIN"
  522. rather than an error.  This satisfies anonymous FTP sites
  523. like ftp.uu.net that insist on having a name for the
  524. machines they talk to. This may fail when talking to sites
  525. that do a DNS cross-check in which the host name is matched
  526. against its address and vice versa.
  527.  
  528. Note that hiding names in the DNS doesn't address the
  529. problem of host names "leaking" out in mail headers,
  530. news articles, etc.
  531.  
  532. ------------------------------
  533.  
  534. Date: Mon Jun 27 16:00:17 1994
  535. From: Fwalls-FAQ@tis.com
  536. Subject: 13: How do I make FTP work through my firewall?
  537.  
  538. Generally, making FTP work through the firewall is done
  539. either using a proxy server or by permitting incoming
  540. connections to the network at a restricted port range, and
  541. otherwise restricting incoming connections using something
  542. like "established" screening rules. The FTP client is then
  543. modified to bind the data port to a port within that range.
  544. This entails being able to modify the FTP client application
  545. on internal hosts.
  546.  
  547. A different approach is to use the FTP "PASV"
  548. option to indicate that the remote FTP server should permit
  549. the client to initiate connections. The  PASV approach
  550. assumes that the FTP server on the remote system supports
  551. that operation. (See RFC1579 for more information)
  552.  
  553. Other sites prefer to build client versions of
  554. the FTP program that are linked against a SOCKS library.
  555.  
  556.  
  557.  
  558.